<?php

class Model_DbTable_ResourcesCategory extends Zend_Db_Table
{
    protected $_name = 'resources_category';
    protected $_primary = 'rcid';
    protected $_dependentTables = array(
        'Model_DbTable_Resources' ,
        'Model_DbTable_ResourcesCategory'
    );

    public function update (array $data, $where)
    {
        $filterArray = array(
            'rcid' ,
            'rcname'
        );
        $fields = $this->info(Zend_Db_Table_Abstract::COLS);
        foreach ($data as $key => $val) {
            if (in_array($key, $filterArray)) {
                unset($data[$key]);
            }
            if (! in_array($key, $fields)) {
                unset($data[$key]);
            }
        }
        return parent::update($data, $where);
    }
}